import re
from datetime import datetime

# 日期字符串
date_string = '2022-03-13'

# 正则表达式模式
pattern = r'(\d{4})-(\d{2})-(\d{2})'

# 匹配日期字符串
match = re.match(pattern, date_string)

# 解析日期
year = int(match.group(1))
month = int(match.group(2))
day = int(match.group(3))
date = datetime(year, month, day)

# 格式化日期
formatted_date = date.strftime('%Y/%m/%d')
print(formatted_date)  # 输出：2022/03/13
